function individuosS = ruleta( individuos, k, fit )
    
    fit = fit*(-1);
    fit = ones(1,cols(fit))./fit;

    totalFit = sum(fit);
    p=zeros(1,rows(individuos));
    q=zeros(1,rows(individuos));
    for i=1:rows(individuos)
        p(i)=fit(i)/totalFit;
        q(i)=sum(p);
    end
    
    for j=1:k
        r=rand(1);
        l=1;
        while q(l)<r
            l=l+1;
        end
        individuosS(j,:) = individuos(l,:);
    end
end

